package com.zxy.ziems.collector;

import com.github.lianjiatech.retrofit.spring.boot.core.RetrofitScan;
import com.zxy.ziems.collector.application.SpringbootJavaFxApplication;
import javafx.application.Application;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.scheduling.annotation.EnableScheduling;

/**
 * Jfx应用
 * @author chdzq
 * @create 2024/4/07
 */
@RetrofitScan("com.zxy.ziems.collector.httpClient")
@SpringBootApplication
@ComponentScan(basePackages = {"com.zxy"})
public class JfxCollectorApplication {

    private static final Logger logger = LoggerFactory.getLogger(JfxCollectorApplication.class);

    public static void main(String[] args) {
        // 捕捉未处理的异常
       /* Thread.setDefaultUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {
            @Override
            public void uncaughtException(Thread t, Throwable e) {
                // 抛出栈信息
                logger.error("[异常信息]{}", e.getLocalizedMessage());
            }
        });*/
        Application.launch(SpringbootJavaFxApplication.class, args);
    }
}
